import {chang_login_account_input, update_login_or_register_state, update_title_index} from "../../body/contants";

export const updateTitleIndex = (index) => ({
    type: update_title_index,
    index: index
});


export const updateLoginAndRegisterState = (showState, resState) => ({
    type: update_login_or_register_state,
    showState: showState,
    registerState: resState
});

//tag: boolean  用来区分 true 登录 , false 注册
// inputTag  0 账号, 1 密码, 2 重复密码
export const changeLoginAccountInput = (e,tag,inputTag) => (
    {
        type: chang_login_account_input,
        tag:tag,
        inputTag:inputTag,
        inputValue:e.target.value
    }
);